package bancosys.tec.persist.entities.dao;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import bancosys.tec.persist.dao.BaseDAO;
import bancosys.tec.persist.dao.BeanNotFoundException;
import bancosys.tec.persist.entities.domain.PaiComMapa;

/**
 * @created 18.07.2008
 * @author piercio
 */
public class PaiComMapaDAO extends BaseDAO<PaiComMapa> {

    public PaiComMapa findByName(String name) throws BeanNotFoundException {
        Criteria crit = this.createCriteria();
        crit.add(Restrictions.eq("name", name));
        return this.executeSingleQuery(crit);
    }
}